package com.hy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hy.medicine.MedicineBasicInfo;
import com.hy.medicine.vo.MedicineBasicInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【medicine_basic_info(药品基本信息表)】的数据库操作Mapper
* @createDate 2025-03-11 19:16:10
* @Entity com.hy.medicine.pojo.MedicineBasicInfo
*/
@Mapper
public interface MedicineBasicInfoMapper extends BaseMapper<MedicineBasicInfo> {
//  查询药品基本信息表
    List<MedicineBasicInfo> getMedicineInfo(MedicineBasicInfoVo medicineBasicInfoVo);

    /**
     * 根据批准文号查询药品信息
     */
    MedicineBasicInfo selectByApprovalNumber(@Param("approvalNumber") String approvalNumber);

    /**
     * 批量插入药品信息
     */
    int batchInsert(@Param("list") List<MedicineBasicInfo> list);

    /**
     * 查询所有药品的批准文号
     * @return
     */
    @Select("SELECT approval_number FROM medicine_basic_info")
    List<String> selectAllApprovalNumbers();

}




